package com.itheima.tlias.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Pointcut;

/**
 * 测试切面类
 *
 * @Author mr.luo
 * @Date 16 4月 2025 15:58
 */
@Slf4j
//@Aspect
//@Component
public class Demo1Aspect {
    @Pointcut("com.itheima.tlias.aspect.CostTimeAspect.pt()")
    public void pt(){}

    @Around("pt()")
    public Object demoAspect(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
        log.info("开始前");
        Object proceed = proceedingJoinPoint.proceed();
        log.info("目标方法结束后");
        return proceed;
    }
}
